package practice7;

import java.util.HashSet;
import java.util.Set;

public class P3 {

	public static int gcd(int a,int b) {
		if(a%b==0) {
			return b;
		}
		return gcd(b,a%b);
	}
	
	
	public static void main(String[] args) {
		
		Set<String> set=new HashSet<>();
	
		for(int x1=0;x1<20;x1++) {
			for(int y1=0;y1<21;y1++) {
				for(int x2=0;x2<20;x2++) {
					for(int y2=0;y2<21;y2++) {
						if(x1==x2 || y1==y2) {
							continue;
						}
						int r=gcd(y2-y1,x2-x1);
						int A=(y2-y1)/r;
						int B=(x1-x2)/r;
						int C=(x2*y1-x1*y2)/r;
						set.add(A+","+B+","+C);
					}
				}
			}
		}
		System.out.println(set.size()+21+20);	//����20����x��ƽ�е��ߣ��Լ�21��
	}

}
